export const namespace = "contentExamDetail";

export const calcColumns = (params) => {
  const columns = [
    {
      title: "试卷ID",
      dataIndex: "id",
      hideInSearch: true,
    },
    {
      title: "试卷名称",
      dataIndex: "name",
    },
    {
      title: "含有题目数",
      // dataIndex: 'date',
      hideInSearch: true,
    },
    {
      title: "试卷描述",
      dataIndex: "msg",
    },
    {
      title: "试卷分值",
      dataIndex: "msg",
      hideInSearch: true,
    },
    {
      title: "测试记录",
      dataIndex: "phone",
      hideInSearch: true,
    },
    // {
    //   title: '更新人',
    //   dataIndex: 'updateBy',
    //   hideInSearch: true

    // },
    //{
    //  title: '更新时间',
    //  dataIndex: 'updateTime',
    //  hideInSearch: true
    //},
    {
      title: "营业状态",
      dataIndex: "state",
      // render: (state) => {
      //   return state ? <Tag border={false}>已启动</Tag> : <Tag color='#f0f'>禁用</Tag>
      // },
      valueEnum: {
        all: { text: "全部", status: "Default" },
        close: { text: "关闭", status: "Default" },
        running: { text: "运行中", status: "Processing" },
        online: { text: "已上线", status: "Success" },
        error: { text: "异常", status: "Error" },
      },
    },
  ];
  if (params?.operate) {
    columns.push(params?.operate);
  }
  return columns;
};
